<template>
  <div class="good-info" v-if="Object.keys(detailInfo).length !== 0">
    <div class="info-desc clear-fix">
      <div class="start"></div>
      <div class="desc">{{detailInfo.desc}}</div>
      <div class="end"></div>
    </div>
    <div v-for="item in detailInfo.detailImage">
      <div class="info-key">{{item.key}}</div>
      <div class="info-list">
        <img :src="item" alt="" v-for="item in item.list"
             @load="imageLoad">
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "DetailGoodsInfo",
    props: {
      detailInfo: {
        type: Object,
        default(){
          return {}
        }
      }
    },
    methods: {
      imageLoad(){
        this.$emit('imageLoad')
      }
    }
  }
</script>

<style scoped>
.good-info{
  padding: 20px 0;
  border-bottom: 6px solid #eee;
}
.info-desc{
  padding: 0 15px;
}
.info-desc .start, .info-desc .end{
  width: 90px;
  height: 1px;
  border-top: 1px solid #a3a3a5;
  position: relative;
}
.info-desc .start{
  float: left;
}
.info-desc .end{
  float: right;
}
.info-desc .start::before, .info-desc .end::after{
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  background: #333;
  bottom: 1px;
}
.info-desc .end::after{
  right: 0;
}
.info-desc .desc{
  padding: 15px 0;
  font-size: 12px;
}
.info-key{
  margin: 10px 0 10px 15px;
  color: #333;
  font-size: 15px;
}
.info-list img{
  width: 100%;
  display: block;
}
</style>